import { RequestConfig } from "@/.umi/plugin-request/request";
import { RequestOptionsInit } from "umi-request"

export const CacheHandlerInterceptor: Pick<RequestConfig, 'requestInterceptor'> = {
    requestInterceptor: (url: string, options: RequestOptionsInit) => {
        options.headers = {
            ...options.headers,
            'Cache-Control': 'no-cache',
            Pragma: 'no-cache',
            Expires: '-1'
        }
    }
}